package com.wry.wry_test.feign.api;

import com.wry.wry_test.feign.config.ThirdServiceInterceptor;
import com.wry.wry_test.feign.fallback.ApiServiceHystrix;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: wangrongyi
 * @Date: 2024/7/12 17:08
 * @Description: 调用平台接口
 */
@FeignClient(value = "api-service", url = "127.0.0.1:18080"
        , fallback = ApiServiceHystrix.class, configuration = {ThirdServiceInterceptor.class})
public interface ApiServiceFeign {

    /**
     * 平台接口预览 方法名可以随便取
     */
    @GetMapping("/iServerOpenApi/query")
    Response getAllUrl(@RequestParam("path") String path,
                       @RequestParam("method") String method);


    @GetMapping("/testProxy")
    void testProxy();

}
